﻿@{
    ViewBag.Title = "Manage";
    Layout = "~/Views/Shared/_Layout.cshtml";

    <style type="text/css">
        tr {
            margin-bottom: 5px;
            margin-top: 5px;
        }

        td, th {
            padding: 5px;
        }
    </style>
    <script src="/Scripts/gbh/BranchManage.js"></script>
}

<div style="margin:10px 10px 10px 10px">

    <table id="branchAll" title="" class="easyui-datagrid" style="width: auto; height: 400px;" toolbar="#toolbarAll"
           rownumbers="true" toolbar="#toolbar" fitcolumns="true" singleselect="true">
        <thead>
            <tr>
                <th field="id" width="30" align="center">
                    Transaction
                </th>
                <th field="mbranchno" width="40" align="center" sortable="true">
                    เลขที่สินค้า
                </th>
                <th field="mcustno" editor="text" width="20" align="center">
                    Customer NO
                </th>
                <th field="mprovice" editor="text" width="20" align="center">
                    Provine
                </th>
                <th field="mprovdesc" editor="text" width="20" align="center">
                    Province Desc
                </th>
            </tr>
        </thead>
    </table>
    <div id="toolbarAll">
        <a href="#" class="easyui-linkbutton" iconcls="icon-add" plain="true" onclick="uploadOrder();">Add Branch</a> <a href="#" class="easyui-linkbutton" iconcls="icon-edit" plain="true"
                                                                                                                         onclick="OpenOrderDetailsPopup(jQuery('#branchAll').datagrid('getSelected').OrderNo, jQuery('#branchAll').datagrid('getSelected'))">Edit Branch</a> <a href="#" class="easyui-linkbutton"
                                                                                                                                                                                                                                                                                iconcls="icon-remove" plain="true" onclick="deleteDocument();">Delete Branch</a>
    </div>

    <div id="w" class="easyui-window" title="Brance Management" data-options="iconCls:'icon-save'" style="width:500px;height:400px;padding:10px;">
        <div style="padding:10px 60px 20px 60px">
            <form id="ff" method="post">
                <table cellpadding="5">
                    <tr>
                        <td>Branch No:</td>
                        <td><input class="easyui-textbox" type="text" name="branchNo" id="branchNo" data-options="required:true"></input></td>
                    </tr>
                    <tr>
                        <td>Cust No:</td>
                        <td><input class="easyui-textbox" type="text" name="custNo" id="custNo" data-options="required:true"></input></td>
                    </tr>
                    <tr>
                        <td>MProvice:</td>
                        <td><input class="easyui-textbox" type="text" name="mprovice" id="mprovice" data-options="required:true"></input></td>
                    </tr>
                    <tr>
                        <td>MProvice Desc:</td>
                        <td><input class="easyui-textbox" name="mproviceDesc" id="mproviceDesc" data-options="multiline:true" style="height:60px"></input></td>
                    </tr>
                    <tr>
                        <td>MProvice Trans:</td>
                        <td><input class="easyui-textbox" type="text" name="mproviceTrans" id="mproviceTrans" data-options="required:true"></input></td>
                    </tr>
                    <tr>
                        <td>MProvice Trans Desc:</td>
                        <td><input class="easyui-textbox" type="text" name="mproviceTransDesc" id="mproviceTransDesc" data-options="required:true"></input></td>
                    </tr>
                    <tr>
                        <td>MProvice Trans Group:</td>
                        <td><input class="easyui-textbox" type="text" name="mproviceTransGroup" id="mproviceTransGroup" data-options="required:true"></input></td>
                    </tr>
                    <tr>
                        <td>Status:</td>
                        <td>
                            <input id="branchStatus" type="checkbox" />
                        </td>
                    </tr>
                </table>
            </form>
            <div style="text-align:center;padding:5px">
                <a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitForm()">Submit</a>
                <a href="javascript:void(0)" class="easyui-linkbutton" onclick="clearForm()">Clear</a>
            </div>
        </div>
    </div>
</div>
